//
//  MenuIcon.m
//  ICrEAM
//
//  Created by mac on 16/10/28.
//  Copyright © 2016年 mac. All rights reserved.
//

#import "MenuIcon.h"
@interface MenuIcon (){
    CGFloat top;
    CGFloat size;
    CGFloat width;
}

@end
@implementation MenuIcon
-(id)initWithCoder:(NSCoder *)aDecoder{
    if (self) {
        self=[super initWithCoder:aDecoder];
        width=38;
        size=1.;
        self.titleLabel.textAlignment=NSTextAlignmentCenter;
        
    }
    return self;
    
}
-(instancetype)initWithFrame:(CGRect)frame{
    self=[super initWithFrame:frame];
    if (self) {
        width=38;
        size=1.;
        self.titleLabel.textAlignment=NSTextAlignmentCenter;
        

    }
    return self;
}
-(void)setHighlighted:(BOOL)highlighted{
    
}
/*
 // Only override drawRect: if you perform custom drawing.
 // An empty implementation adversely affects performance during animation.
 - (void)drawRect:(CGRect)rect {
 // Drawing code
 }
 */
-(CGRect)imageRectForContentRect:(CGRect)contentRect{
    top=4;
    
    return CGRectMake(self.frame.size.width/2.-width/2., top, width, width*size);
    
}
-(CGRect)titleRectForContentRect:(CGRect)contentRect{
  
    return CGRectMake(0,self.height-30,self.frame.size.width ,18);
}

@end
